package cn.qayy.po;

import java.util.Date;

import cn.qayy.dto.TaskDTO;

/**
 * 
 * 
 * @author wangyu
 * 
 * @date 2018-12-19
 */
public class Task {
    private Integer id;

    /**
     * 省份
     */
    private String province;

    /**
     * 地市
     */
    private String city;

    /**
     * 区县
     */
    private String country;

    /**
     * 片区经理
     */
    private String mgr;

    /**
     * 客户
     */
    private String client;

    /**
     * 客户等级
     */
    private String clientLevel;

    /**
     * 品种
     */
    private String product;

    /**
     * 包装
     */
    private String page;

    /**
     * 终端QS名
     */
    private String terminalQs;

    /**
     * 终端类型
     */
    private String terminalType;

    /**
     * 终端等级
     */
    private String terminalLevel;

    /**
     * 是否为重点终端
     */
    private String isTerminal;

    /**
     * 是否为重点区县
     */
    private String isCountry;

    /**
     * 协议测算价
     */
    private String policyPrice;

    /**
     * 上季度第一个月份纯销
     */
    private String m1 = "0";

    /**
     * 上季度第二个月份纯销
     */
    private String m2 = "0";

    /**
     * 上季度第三个月份纯销
     */
    private String m3 = "0";

    /**
     * 当前季度第一个月纯销目标
     */
    private String taskM1 = "0";

    /**
     * 当前季度第二个月纯销目标
     */
    private String taskM2 = "0";

    /**
     * 当前季度第三个月纯销目标
     */
    private String taskM3 = "0";

    /**
     * 目标增长率
     */
    private String taskGrowthRate;

    /**
     * 活动安排
     */
    private String event;

    /**
     * 活动费用
     */
    private String eventPrice = "0";

    /**
     * 批复判断
     */
    private String eventRef;

    /**
     * 当前季度实际纯销
     */
    private String quarterActual = "0";

    /**
     * 目标完成率
     */
    private String completeRate;

    /**
     * 实际支出
     */
    private String actualCost = "0";

    /**
     * 备注
     */
    private String note;
    
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province == null ? null : province.trim();
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city == null ? null : city.trim();
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country == null ? null : country.trim();
    }

    public String getMgr() {
        return mgr;
    }

    public void setMgr(String mgr) {
        this.mgr = mgr == null ? null : mgr.trim();
    }

    public String getClient() {
        return client;
    }

    public void setClient(String client) {
        this.client = client == null ? null : client.trim();
    }

    public String getClientLevel() {
        return clientLevel;
    }

    public void setClientLevel(String clientLevel) {
        this.clientLevel = clientLevel == null ? null : clientLevel.trim();
    }

    public String getProduct() {
        return product;
    }

    public void setProduct(String product) {
        this.product = product == null ? null : product.trim();
    }

    public String getPage() {
        return page;
    }

    public void setPage(String page) {
        this.page = page == null ? null : page.trim();
    }

    public String getTerminalQs() {
        return terminalQs;
    }

    public void setTerminalQs(String terminalQs) {
        this.terminalQs = terminalQs == null ? null : terminalQs.trim();
    }

    public String getTerminalType() {
        return terminalType;
    }

    public void setTerminalType(String terminalType) {
        this.terminalType = terminalType == null ? null : terminalType.trim();
    }

    public String getTerminalLevel() {
        return terminalLevel;
    }

    public void setTerminalLevel(String terminalLevel) {
        this.terminalLevel = terminalLevel == null ? null : terminalLevel.trim();
    }

    public String getIsTerminal() {
        return isTerminal;
    }

    public void setIsTerminal(String isTerminal) {
        this.isTerminal = isTerminal == null ? null : isTerminal.trim();
    }

    public String getIsCountry() {
        return isCountry;
    }

    public void setIsCountry(String isCountry) {
        this.isCountry = isCountry == null ? null : isCountry.trim();
    }

    public String getPolicyPrice() {
        return policyPrice;
    }

    public void setPolicyPrice(String policyPrice) {
        this.policyPrice = policyPrice == null ? null : policyPrice.trim();
    }

    public String getM1() {
        return m1;
    }

    public void setM1(String m1) {
        this.m1 = m1 == null ? null : m1.trim();
    }

    public String getM2() {
        return m2;
    }

    public void setM2(String m2) {
        this.m2 = m2 == null ? null : m2.trim();
    }

    public String getM3() {
        return m3;
    }

    public void setM3(String m3) {
        this.m3 = m3 == null ? null : m3.trim();
    }

    public String getTaskM1() {
        return taskM1;
    }

    public void setTaskM1(String taskM1) {
        this.taskM1 = taskM1 == null ? null : taskM1.trim();
    }

    public String getTaskM2() {
        return taskM2;
    }

    public void setTaskM2(String taskM2) {
        this.taskM2 = taskM2 == null ? null : taskM2.trim();
    }

    public String getTaskM3() {
        return taskM3;
    }

    public void setTaskM3(String taskM3) {
        this.taskM3 = taskM3 == null ? null : taskM3.trim();
    }

    public String getTaskGrowthRate() {
        return taskGrowthRate;
    }

    public void setTaskGrowthRate(String taskGrowthRate) {
        this.taskGrowthRate = taskGrowthRate == null ? null : taskGrowthRate.trim();
    }

    public String getEvent() {
        return event;
    }

    public void setEvent(String event) {
        this.event = event == null ? null : event.trim();
    }

    public String getEventPrice() {
        return eventPrice;
    }

    public void setEventPrice(String eventPrice) {
        this.eventPrice = eventPrice == null ? null : eventPrice.trim();
    }

    public String getEventRef() {
        return eventRef;
    }

    public void setEventRef(String eventRef) {
        this.eventRef = eventRef == null ? null : eventRef.trim();
    }

    public String getQuarterActual() {
        return quarterActual;
    }

    public void setQuarterActual(String quarterActual) {
        this.quarterActual = quarterActual == null ? null : quarterActual.trim();
    }

    public String getCompleteRate() {
        return completeRate;
    }

    public void setCompleteRate(String completeRate) {
        this.completeRate = completeRate == null ? null : completeRate.trim();
    }

    public String getActualCost() {
        return actualCost;
    }

    public void setActualCost(String actualCost) {
        this.actualCost = actualCost == null ? null : actualCost.trim();
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note == null ? null : note.trim();
    }
    
	public Task(Integer id, String province, String city, String country, String mgr, String client, String clientLevel,
			String product, String page, String terminalQs, String terminalType, String terminalLevel,
			String isTerminal, String isCountry, String policyPrice, String m1, String m2, String m3, String taskM1,
			String taskM2, String taskM3, String taskGrowthRate, String event, String eventPrice, String eventRef,
			String quarterActual, String completeRate, String actualCost, String note) {
		super();
		this.id = id;
		this.province = province;
		this.city = city;
		this.country = country;
		this.mgr = mgr;
		this.client = client;
		this.clientLevel = clientLevel;
		this.product = product;
		this.page = page;
		this.terminalQs = terminalQs;
		this.terminalType = terminalType;
		this.terminalLevel = terminalLevel;
		this.isTerminal = isTerminal;
		this.isCountry = isCountry;
		this.policyPrice = policyPrice;
		this.m1 = m1;
		this.m2 = m2;
		this.m3 = m3;
		this.taskM1 = taskM1;
		this.taskM2 = taskM2;
		this.taskM3 = taskM3;
		this.taskGrowthRate = taskGrowthRate;
		this.event = event;
		this.eventPrice = eventPrice;
		this.eventRef = eventRef;
		this.quarterActual = quarterActual;
		this.completeRate = completeRate;
		this.actualCost = actualCost;
		this.note = note;
	}

	public Task() {
		super();
	}

	@Override
	public String toString() {
		return "Task [id=" + id + ", province=" + province + ", city=" + city + ", country=" + country + ", mgr=" + mgr
				+ ", client=" + client + ", clientLevel=" + clientLevel + ", product=" + product + ", page=" + page
				+ ", terminalQs=" + terminalQs + ", terminalType=" + terminalType + ", terminalLevel=" + terminalLevel
				+ ", isTerminal=" + isTerminal + ", isCountry=" + isCountry + ", policyPrice=" + policyPrice + ", m1="
				+ m1 + ", m2=" + m2 + ", m3=" + m3 + ", taskM1=" + taskM1 + ", taskM2=" + taskM2 + ", taskM3=" + taskM3
				+ ", taskGrowthRate=" + taskGrowthRate + ", event=" + event + ", eventPrice=" + eventPrice
				+ ", eventRef=" + eventRef + ", quarterActual=" + quarterActual + ", completeRate=" + completeRate
				+ ", actualCost=" + actualCost + ", note=" + note+"]";
	}

	/**
	 * 注意传递过来的参数，有则更新
	 * @param dto
	 */
	public void setByDTO(TaskDTO dto) {
		this.setIsTerminal(dto.getIsTerminal());
		this.setIsCountry(dto.getIsCountry());
		this.setTaskM1(dto.getTaskM1());
		this.setTaskM2(dto.getTaskM2());
		this.setTaskM3(dto.getTaskM3());
		this.setEvent(dto.getEvent());
		this.setEventPrice(dto.getEventPrice());
		this.setEventRef(dto.getEventRef());
		this.setActualCost(dto.getActualCost());
		this.setNote(dto.getNote());
		this.setTaskGrowthRate(dto.getTaskGrowthRate());
		this.setCompleteRate(dto.getCompleteRate());
	}
}